<template>
  <div class="form-main time-select">
    <yearSelect @getYear="getYear"/>
    <cqSelect 
      v-model="timeValue"
      :time="cqTime"
      placeholder="请选择季"
      @change="timeSelectChange"/>
    <monthSelect 
      :initMonthPoint="'2012-04'"
      :initMonthPeriod="['2012-04', '2012-05']"
      @getMonthPonit="getMonthPonit" 
      @getMonthPeriod="getMonthPeriod" />
  </div>
</template>
 
<script>
import yearSelect from '@/components/datePicker/year/year'

import cqSelect from '@/components/datePicker/quarter/cqSelect'
import qSelect from '@/components/datePicker/quarter/qSelect'

import monthSelect from '@/components/datePicker/month/month'
import weekSelect from '@/components/datePicker/week/week'
import dateSelect from '@/components/datePicker/date/date'

export default {
  name: 'timeSelect',
  components: { yearSelect, cqSelect, qSelect, monthSelect, weekSelect, dateSelect},
  data () {
    return {
      timeValue:'',
      cqTime: new Date().getFullYear(),
      // cqTime: new Date().getMonth(),
      // cqTime: new Date().getDate(),

    }
  },
  created() {
    // console.log(new Date().getFullYear())
  },
  methods: {
    getYear(v) {
      let y = v ? v.getFullYear() : 'del'
    },
    timeSelectChange(v) {
      console.log(v)
    },
    
    getMonthPonit(v) {
      console.log(v)
    },
    getMonthPeriod(v) {
      console.log(v)
    }

  }
}
</script>
 
<style scoped lang="scss">
 
</style>